package com.tiantianfresh.model.pojo;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author FANGAO
 * @date 2021/12/1 - 上午 11:31
 */
@Data
@Table(name = "r_shopping_cart")
public class ShoppingCart {
    @Id
    private Integer scid;
    private String shoppingCartPath;
    private String shoppingCartName;
    private String shoppingCartWeight;
    private Double shoppingCartUnitPrice;
    private Integer shoppingCartQuantity;
    private Integer shoppingCartState;
    private Integer userid;
    @Transient
    private Double shoppingCartTotal;


    public Double getShoppingCartTotal() {
        return shoppingCartUnitPrice*shoppingCartQuantity;
    }
}
